package com.weasel.weixin.commons.session;

import java.util.Collection;
import java.util.Date;

/**
 * Created by Dylan on 2015/12/7.
 */
public interface WeixinSession {

    /**
     *
     * @return
     */
    String getId();

    /**
     *
     * @return
     */
    Date getStartTime();

    /**
     * @return
     */
    Date getLastAccessTime();

    /**
     * @return
     */
    long getTimeout();

    /**
     * @param maxIdleTimeInMillis
     */
    void setTimeout(long maxIdleTimeInMillis);

    /**
     *
     */
    void stop();

    /**
     *
     * @return
     */
    Collection<Object> getAttributeKeys();

    /**
     * @param key
     * @return
     */
    Object getAttribute(Object key);

    /**
     * @param key
     * @param value
     */
    void setAttribute(Object key,Object value);

    /**
     * @param key
     * @return
     */
    Object removeAttribute(Object key);


}
